package com.ysy.logistics.entities.system;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/3/13 9:39
 **/
@Data
@TableName("sys_role")
@Schema(name = "sys_role", description = "角色实体类")
public class SysRole {
    @Schema(description = "角色id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;
    @Schema(description = "角色名")
    @TableField(value = "name")
    @NotBlank(message = "角色名不能为空")
    private String name;

    @Schema(description = "编码")
    @TableField(value = "code")
    @NotBlank(message = "编码不能为空")
    private String code;

    @Schema(description = "排序")
    @TableField(value = "num")
    @NotBlank(message = "排序不能为空")
    private Integer num;

    @Schema(description = "描述")
    @TableField(value = "describes")
    private String describes;


    @Version
    @TableField(value = "version")
    @Schema(description = "乐观锁", hidden = true)
    private Integer version;
}
